package com.xuzhijie.pms.entity.vo;

import com.xuzhijie.pms.entity.Renovation;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class RenovationVo {

    private String id;

    /**
     * 申请装修的建筑
     */
    private String building;

    /**
     * 业主申请1，准许装修2，装修完工3，物业确认4
     */
    private String renovationCurrentProgress;

    /**
     * 装修保证金
     */
    private Integer deposit;

    private LocalDateTime createTime;

    /**
     * 是否返还保证金
     */
    private Integer isReturn;

    /**
     * 装修申请人
     */
    private String applicant;

    public RenovationVo(Renovation renovation){
        if (renovation.getCurrentProgress().equals(1)){
            this.renovationCurrentProgress = "业主申请";
        }
        if (renovation.getCurrentProgress().equals(2)){
            this.renovationCurrentProgress = "准许装修";
        }
        if (renovation.getCurrentProgress().equals(3)){
            this.renovationCurrentProgress = "装修完工";
        }
        if (renovation.getCurrentProgress().equals(4)){
            this.renovationCurrentProgress = "物业确认";
        }
    }
}
